home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / systems / minix / update2 < prev    next >
Text File  |  1995-11-25  |  1KB  |  60 lines

  1. *** /tmp/,RCSt1a15217    Fri Aug 25 00:06:33 1989
  2. --- qsort.c    Thu Aug 24 23:50:59 1989
  3. ***************
  4. *** 178,183 ****
  5. --- 178,184 ----
  6.   {
  7.       if(num < 2)
  8.           return; /* nothing to do */
  9. + #if 0
  10.       else if(num == 2)  /* at some point replace if n < THRESH do insert sort */
  11.       {    /* degenerate case */
  12.           if(((*cmp)( base, ((uchar *)base)+size )) > 0)
  13. ***************
  14. *** 189,194 ****
  15. --- 190,196 ----
  16.           }
  17.           return;
  18.           }
  19. + #endif
  20.   #ifdef SHORT_ALIGN_DESIRABLE
  21.       /* assumption: if short align desired, then its ok to
  22.          align a long at a short boundary too.
  23. ***************
  24. *** 196,212 ****
  25.       if(SHORT_ALIGNED(base))
  26.       {
  27.           if(size == 2)
  28. !         _wqsort((ushort *)base, 0, num-1, cmp);
  29.           else if(size == 4)
  30. !         _lqsort((ulong *)base, 0, num-1, cmp);
  31.       }
  32.   #else
  33.       if((size == 4) && LONG_ALIGNED(base))
  34. !         _lqsort((ulong *)base, 0, num-1, cmp);
  35.   #endif
  36.       else
  37.       {
  38.           if((_qbuf = alloca(size)) == (void *)0) return;
  39. !         _nqsort((uchar *)base, 0, num-1, size, cmp);
  40.       }
  41.   }
  42. --- 198,214 ----
  43.       if(SHORT_ALIGNED(base))
  44.       {
  45.           if(size == 2)
  46. !         _wqsort((ushort *)base, 0L, num-1, cmp);
  47.           else if(size == 4)
  48. !         _lqsort((ulong *)base, 0L, num-1, cmp);
  49.       }
  50.   #else
  51.       if((size == 4) && LONG_ALIGNED(base))
  52. !         _lqsort((ulong *)base, 0L, num-1, cmp);
  53.   #endif
  54.       else
  55.       {
  56.           if((_qbuf = alloca(size)) == (void *)0) return;
  57. !         _nqsort((uchar *)base, 0L, num-1, size, cmp);
  58.       }
  59.   }
  60.